<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Turtle DB: ca.uqac.dim.ddb.Relation Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Turtle DB
   
   </div>
   <div id="projectbrief">A mini DDBMS</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">ca.uqac.dim.ddb.Relation Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="ca::uqac::dim::ddb::Relation" --><div class="dynheader">
Inheritance diagram for ca.uqac.dim.ddb.Relation:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.png" usemap="#ca.uqac.dim.ddb.Relation_map" alt=""/>
  <map id="ca.uqac.dim.ddb.Relation_map" name="ca.uqac.dim.ddb.Relation_map">
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_n_ary_relation.html" alt="ca.uqac.dim.ddb.NAryRelation" shape="rect" coords="99,56,287,80"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html" alt="ca.uqac.dim.ddb.Table" shape="rect" coords="297,56,485,80"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_unary_relation.html" alt="ca.uqac.dim.ddb.UnaryRelation" shape="rect" coords="594,56,782,80"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_intersection.html" alt="ca.uqac.dim.ddb.Intersection" shape="rect" coords="0,112,188,136"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_union.html" alt="ca.uqac.dim.ddb.Union" shape="rect" coords="198,112,386,136"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_projection.html" alt="ca.uqac.dim.ddb.Projection" shape="rect" coords="396,112,584,136"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_selection.html" alt="ca.uqac.dim.ddb.Selection" shape="rect" coords="594,112,782,136"/>
<area href="classca_1_1uqac_1_1dim_1_1ddb_1_1_variable_table.html" alt="ca.uqac.dim.ddb.VariableTable" shape="rect" coords="792,112,980,136"/>
</map>
 </div></div>

<p><a href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#abfa610a33e112f2ee8140bdf34a843ff">reset</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_schema.html">Schema</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aef622fda44eb3c250098f1b03db5989a">getSchema</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aa55828d3edb632ee78c4d1222a5ceadc">Relation</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">final boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a3eb603ca0fb31e0dc36703359f7d24c9">hasNext</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">final <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aec79ff9e41c1245b1a3a698b2d53762d">next</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">final int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#ab0bc3407af446c73068bcd349259a648">getDegree</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a0000297d4df07d2c7b025c12fa25e59d">toString</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a363487cf2656ea20b85e0c6ac2a30c12">remove</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a6743aca7ee7eb1b1cb0f2511043723f7">accept</a> (<a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_query_visitor.html">QueryVisitor</a> v)  throws QueryVisitor.VisitorException</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#abd2598443bd841a3dff15951531c9e9d">getCardinality</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a2497f0211ff973703b654dbae430d67d">tupleCount</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a715a04546f0d7ce6b052605f4b610b43">contains</a> (<a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a> tup)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a2a42a9a2f683f4adbd30b4978025c84b">internalNext</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">List&lt; <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a7290651eba3d134169d8a9bd219d6dc8">m_outputTuples</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#ad22a53bcf6aac458b5d235c5ace66c4a">m_nextTuple</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#ac2cfe0a2b0ec8f3882111d43f02f2bb4">m_internalNextCalled</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A relation is implemented as a map from a set of tuples (the relation's <em>key</em>) to a set of tuples </p>
<dl class="author"><dt><b>Author:</b></dt><dd>sylvain </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa55828d3edb632ee78c4d1222a5ceadc"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::Relation" ref="aa55828d3edb632ee78c4d1222a5ceadc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aa55828d3edb632ee78c4d1222a5ceadc">ca.uqac.dim.ddb.Relation.Relation</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Empty constructor. Should only be called from children's constructors. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6743aca7ee7eb1b1cb0f2511043723f7"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::accept" ref="a6743aca7ee7eb1b1cb0f2511043723f7" args="(QueryVisitor v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract void <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a6743aca7ee7eb1b1cb0f2511043723f7">ca.uqac.dim.ddb.Relation.accept</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_query_visitor.html">QueryVisitor</a>&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td>  throws QueryVisitor.VisitorException<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#a007b184b67c1648b715e101cda69b6c0">ca.uqac.dim.ddb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_projection.html#af64ae34340fad96d75a81e8d1708bc1e">ca.uqac.dim.ddb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_selection.html#a4b07418153da8dbaf6c5de16b22e11a9">ca.uqac.dim.ddb.Selection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_intersection.html#a7c79a99da63e0b397e3e7cd76c341c72">ca.uqac.dim.ddb.Intersection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_variable_table.html#a69dfbcfec0b5d4dd69b0b7d7525fad8c">ca.uqac.dim.ddb.VariableTable</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_union.html#aa11fd586af8a762591c95fb61811ae14">ca.uqac.dim.ddb.Union</a>.</p>

</div>
</div>
<a class="anchor" id="a715a04546f0d7ce6b052605f4b610b43"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::contains" ref="a715a04546f0d7ce6b052605f4b610b43" args="(Tuple tup)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a715a04546f0d7ce6b052605f4b610b43">ca.uqac.dim.ddb.Relation.contains</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a>&#160;</td>
          <td class="paramname"><em>tup</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determines if a relation contains a given tuple. Warning #1: this implementation is inefficient, as it enumerates all tuples until found. Warning #2: using <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a715a04546f0d7ce6b052605f4b610b43">contains</a> resets any undergoing enumeration made on the relation. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tup</td><td>The tuple to look for </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the tuple is present, false otherwise </dd></dl>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#a9f45a1734d12765f33f5f4dfd4b07528">ca.uqac.dim.ddb.Table</a>.</p>

</div>
</div>
<a class="anchor" id="abd2598443bd841a3dff15951531c9e9d"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::getCardinality" ref="abd2598443bd841a3dff15951531c9e9d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#abd2598443bd841a3dff15951531c9e9d">ca.uqac.dim.ddb.Relation.getCardinality</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Computes the cardinality of a relation. Except for instances of <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html">Table</a> (which actually contain concrete tuples), calling this method will trigger the evaluation of the query tree and the enumeration of all tuples. It should be used sparingly. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of tuples in the relation </dd></dl>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#a00b4cbf2a0ad0193146cab525da238e8">ca.uqac.dim.ddb.Table</a>.</p>

</div>
</div>
<a class="anchor" id="ab0bc3407af446c73068bcd349259a648"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::getDegree" ref="ab0bc3407af446c73068bcd349259a648" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final int <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#ab0bc3407af446c73068bcd349259a648">ca.uqac.dim.ddb.Relation.getDegree</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A relation's degree is the size of its schema. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The relation's degree </dd></dl>

</div>
</div>
<a class="anchor" id="aef622fda44eb3c250098f1b03db5989a"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::getSchema" ref="aef622fda44eb3c250098f1b03db5989a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_schema.html">Schema</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aef622fda44eb3c250098f1b03db5989a">ca.uqac.dim.ddb.Relation.getSchema</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the relation's schema </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The schema </dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#a1f0d67156e7ca206c1fe2295626ee110">ca.uqac.dim.ddb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_variable_table.html#a205f8e065d9f548424612f511a088af7">ca.uqac.dim.ddb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_projection.html#a6808fa764a791858bf89a1260adb2333">ca.uqac.dim.ddb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_n_ary_relation.html#ade8528d30b183d354a3146607e3abfc0">ca.uqac.dim.ddb.NAryRelation</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_selection.html#a3e798977da69d734747a1f9ff1b0c83f">ca.uqac.dim.ddb.Selection</a>.</p>

</div>
</div>
<a class="anchor" id="a3eb603ca0fb31e0dc36703359f7d24c9"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::hasNext" ref="a3eb603ca0fb31e0dc36703359f7d24c9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a3eb603ca0fb31e0dc36703359f7d24c9">ca.uqac.dim.ddb.Relation.hasNext</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a2a42a9a2f683f4adbd30b4978025c84b"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::internalNext" ref="a2a42a9a2f683f4adbd30b4978025c84b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a2a42a9a2f683f4adbd30b4978025c84b">ca.uqac.dim.ddb.Relation.internalNext</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Method that must be implemented by every non-abstract relation; it returns the next tuple of the enumeration, if any. Methods <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aec79ff9e41c1245b1a3a698b2d53762d">next</a> and <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a3eb603ca0fb31e0dc36703359f7d24c9">hasNext</a> use the return value of <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a2a42a9a2f683f4adbd30b4978025c84b">internalNext</a> and additionally remove any duplicate tuples from the output enumeration. Hence a call to <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aec79ff9e41c1245b1a3a698b2d53762d">next</a> may result in multiple calls to the relation's <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a2a42a9a2f683f4adbd30b4978025c84b">internalNext</a>, if the tuples returned are already part of the result (this is especially true of <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_projection.html">Projection</a>s. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The next tuple, <code>null</code> if no such tuple exists </dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#ab3c489022109249a7aade1128e2029a5">ca.uqac.dim.ddb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_projection.html#ace3b9d4bfe07dc3d16fdab5bfe7dcc0e">ca.uqac.dim.ddb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_selection.html#aecab7ac4f91beec9c99119216d207f36">ca.uqac.dim.ddb.Selection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_variable_table.html#af2fed7e41703e8f30c75fa5953b1c993">ca.uqac.dim.ddb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_intersection.html#ae9ed608f1e6ba7167e9cacdd188b8847">ca.uqac.dim.ddb.Intersection</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_union.html#a5c7777663c56b888dd9d5cc4e800f739">ca.uqac.dim.ddb.Union</a>.</p>

</div>
</div>
<a class="anchor" id="aec79ff9e41c1245b1a3a698b2d53762d"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::next" ref="aec79ff9e41c1245b1a3a698b2d53762d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#aec79ff9e41c1245b1a3a698b2d53762d">ca.uqac.dim.ddb.Relation.next</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a363487cf2656ea20b85e0c6ac2a30c12"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::remove" ref="a363487cf2656ea20b85e0c6ac2a30c12" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a363487cf2656ea20b85e0c6ac2a30c12">ca.uqac.dim.ddb.Relation.remove</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#aa82a7c4bd9caed8ca77fb786bc20c167">ca.uqac.dim.ddb.Table</a>.</p>

</div>
</div>
<a class="anchor" id="abfa610a33e112f2ee8140bdf34a843ff"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::reset" ref="abfa610a33e112f2ee8140bdf34a843ff" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#abfa610a33e112f2ee8140bdf34a843ff">ca.uqac.dim.ddb.Relation.reset</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Resets the enumeration of tuples, i.e. starts back at the first tuple of the relation. </p>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#a57a8a7fdb3be3d0ec2fea534b4043548">ca.uqac.dim.ddb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_union.html#a2da416ee804d3d7dca04cf83accab422">ca.uqac.dim.ddb.Union</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_unary_relation.html#a8f3bf5d8b76029077385fce69cf62d83">ca.uqac.dim.ddb.UnaryRelation</a>.</p>

</div>
</div>
<a class="anchor" id="a0000297d4df07d2c7b025c12fa25e59d"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::toString" ref="a0000297d4df07d2c7b025c12fa25e59d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">String <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a0000297d4df07d2c7b025c12fa25e59d">ca.uqac.dim.ddb.Relation.toString</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pretty-prints a relation to a string </p>

</div>
</div>
<a class="anchor" id="a2497f0211ff973703b654dbae430d67d"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::tupleCount" ref="a2497f0211ff973703b654dbae430d67d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract int <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a2497f0211ff973703b654dbae430d67d">ca.uqac.dim.ddb.Relation.tupleCount</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the number of actual tuples present in the query. This number is different from the cardinality of the query; it counts the number of tuples that are present in the leaves of the query tree. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The tuple count </dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_table.html#a8561aa22cd3f357b3de1af0d778ff942">ca.uqac.dim.ddb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_variable_table.html#ac2aa741e544137557a63a15e66de67ee">ca.uqac.dim.ddb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_n_ary_relation.html#a8156c71cca60008905f76014d2fd9d9c">ca.uqac.dim.ddb.NAryRelation</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_unary_relation.html#ac8571dc5ff32def671512f811dd3fc44">ca.uqac.dim.ddb.UnaryRelation</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ac2cfe0a2b0ec8f3882111d43f02f2bb4"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::m_internalNextCalled" ref="ac2cfe0a2b0ec8f3882111d43f02f2bb4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#ac2cfe0a2b0ec8f3882111d43f02f2bb4">ca.uqac.dim.ddb.Relation.m_internalNextCalled</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ad22a53bcf6aac458b5d235c5ace66c4a"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::m_nextTuple" ref="ad22a53bcf6aac458b5d235c5ace66c4a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#ad22a53bcf6aac458b5d235c5ace66c4a">ca.uqac.dim.ddb.Relation.m_nextTuple</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a7290651eba3d134169d8a9bd219d6dc8"></a><!-- doxytag: member="ca::uqac::dim::ddb::Relation::m_outputTuples" ref="a7290651eba3d134169d8a9bd219d6dc8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">List&lt;<a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_tuple.html">Tuple</a>&gt; <a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html#a7290651eba3d134169d8a9bd219d6dc8">ca.uqac.dim.ddb.Relation.m_outputTuples</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Engin/src/ca/uqac/dim/ddb/<a class="el" href="_relation_8java.html">Relation.java</a></li>
</ul>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceca.html">ca</a>      </li>
      <li class="navelem"><a class="el" href="namespaceca_1_1uqac.html">uqac</a>      </li>
      <li class="navelem"><a class="el" href="namespaceca_1_1uqac_1_1dim.html">dim</a>      </li>
      <li class="navelem"><a class="el" href="namespaceca_1_1uqac_1_1dim_1_1ddb.html">ddb</a>      </li>
      <li class="navelem"><a class="el" href="classca_1_1uqac_1_1dim_1_1ddb_1_1_relation.html">Relation</a>      </li>

    <li class="footer">Generated on Thu Aug 30 2012 12:03:10 for Turtle DB by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
